package com.jdplat.jdm.web.service.system.impl;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.jdplat.jdm.core.web.service.impl.BaseServiceImpl;
import com.jdplat.jdm.web.service.system.ISystemLoginService;

/** 
* @author: qirp 
* @time: 2016��11��30�� ����4:12:54 
*/
@Service
public class SystemLoginServiceImpl extends BaseServiceImpl implements ISystemLoginService{

	public void checkMobile(String mobile) {
		Map<String, String> map = new HashMap<String, String>();
		map.put("username", "admin");
		map.put("password", "e10adc3949ba59abbe56e057f20f883e");
		List obj = getDao().queryForList("login_space.checkLogin", map);
		System.out.println(obj);
	}

	public List getLoginInfo(String mobile) {
		return getDao().queryForList("login_space.getLoginInfo", mobile);
	}

	public List getAllUserInfo() {
		return getDao().queryForList("login_space.getAllUserInfo");
	}

	@Override
	public List getLog() {
		Map<String, Object> map = new HashMap<>();
		map.put("pages", 2);
		map.put("size", 10);
		List list = null;
		try {
			list = getDao().queryForPage("login_space.getLog", map);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return list;
	}

}
